;;;Place a block named LTIC at end of a line.
;;;	Author:
;;;		Henry C. Francis
;;;		425 N. Ashe St.
;;;		Southern Pines, NC 28387
;;;
;;;	http://www.paracadd.com
;;;	All rights reserved.
;;;
(defun c:ltic ( / );ent end1 end2 dis1 dis2 curla ang inpt
  (if dimscl nil (load"dimscl"))
  (dimscl)
  (if c:svlayr nil (load"mklayr"))
  (c:svlayr)
  (while
    (setq ent (entsel "\nSelect line for terminator "))
    (progn
      (setq end1 (cdr(assoc 10(entget (car ent)))))
      (setq end2 (cdr(assoc 11(entget (car ent)))))
      (setq dis1 (distance (nth 1 ent) end1))
      (setq dis2 (distance (nth 1 ent) end2))
      (setq curla (cdr(assoc 8(entget (car ent)))))
      (if (> dis1 dis2)
        (setq ang (angtos(angle end2 end1) 0 4)
              inpt end2)
        (setq ang (angtos(angle end1 end2) 0 4)
              inpt end1)
      );if
      (setvar "clayer" curla)
      (command ".insert" "ltic" inpt dimsc dimsc ang)
    );progn
  );while
  (c:rslayr)
);defun
